<?php

require_once('data/SugarBean.php');
require_once('modules/Tasks/Task.php');
require_once('include/utils.php');
require_once('include/TimeDate.php');

class ProgressTimeStamp {
	function stamp_progress(&$bean, $event, $arguments)
	{
		global $current_user;
		if (isset($_REQUEST['getstarted']) && $_REQUEST['getstarted'] == 'true')
		{
			$bean->status = 'In Progress';
	        $bean->date_start = $bean->date_modified;
			$bean->assigned_user_id = $current_user->id;
		}
		if (isset($_REQUEST['complete']) && $_REQUEST['complete'] == 'true')
		{
			$bean->status = 'Completed';
	                $bean->completed_date = $bean->date_modified;
			unset($_REQUEST['complete']);
		}
	}
}

?>
